<?php
if(empty($comments)){
    echo '<h1 class="logo-name" style="font-size: 30px;text-align: center;letter-spacing: 0px">暂无印象..</h1>';
}else{ ?>
<table class="table" style="margin-top: -10px">
        <?php
        foreach($comments as $comment){
            ?>
            <tr><td style="border-top: 0px;padding: 3px;color: #5c5c5c"><b><?=empty($comment['ma']) ? '未知':$comment['ma']['ma_name'].'：' ?></b></td>
                <td  style="border-top: 0px;padding: 3px"><?=empty($comment['mc_detail']) ? '无':substr($comment['mc_detail'],0,180) ?></td>
                <?php if(Yii::$app->user->identity->ma_type<3){?><td  style="border-top: 0px;padding: 3px"><a class="btn btn-white btn-xs" id="comment_del" onclick="CommentDel(<?=$comment['mc_id'] ?>)">
                            <i class="fa fa-trash-o"></i>
                        </a></td><?php } ?>
            </tr>
            <?php
        }?>
    </table>
    <div class="f-r" style="text-align: center;margin-top: -20px">
        <?= \yii\widgets\LinkPager::widget([
            'pagination'=>$commentPages,
            'class'=>'.pagination-sm',
            'linkOptions' => ['onclick' => 'return goCommentPage(this)'],
            'nextPageLabel' => '>>',
            'prevPageLabel' => '<<',
            'maxButtonCount' => 5,
        ]) ?>
    </div>
    <?php
}
?>
